In existing switching devices for variable speed gears in machine tools that have, for example, a gear shift mechanism with eighteen gear stages and three switching bars, a separate electric servomotor is assigned to each switching bar. A cam disc having several offset trip cams is mounted on each of the servomotor drive shafts. A solid base plate serves as a mounting for a number of microswitches in the electric control circuit. These switches are set at differing radial distances from the axis of the motor shaft. The switches are actuated by the respective trip cams on the disc and transmit corresponding electric impulses to the control system which cause each particular electric motor to be switched on and off as required. When the electric motor, which is screw-mounted on the gear cover, is switched on, the rotary motion of its drive shaft is transferred to a pinion via a keyed-on connector. This pinion continually engages a gear rack attached to a switching bar and thus the rotary motion of the motor shaft is translated into a displacement of the switching bar by virtue of the intermeshing teeth on the gear rack and those on the pinion. An example of a switching device of this type may be found in German Patent DE-Gbm No. 77 29 161 assigned to the assignee of the present invention. In practical application, however, problems have arisen using this common switching arrangement. These problems were caused, on the one hand, by the high shock loading of the mechanical components and, on the other hand, by the unfavorable positioning of the trip cams with respect to the microswitches.